package com.jnu.myapplication.addEditfragment;

import com.jnu.myapplication.DataBase.TypeBean;
import com.jnu.myapplication.DataBase.dataManager;
import com.jnu.myapplication.R;

import java.util.List;

public class outfragment extends editfragment {
    int id;
    public outfragment(int id) {
        this.id=id;
    }

    // 重写
    @Override
    public void loadDataToGV() {
        super.loadDataToGV();
        //获取数据库当中的数据源
        List<TypeBean> outlist = dataManager.getTypeList(0);
        typeList.addAll(outlist);
        adapter.notifyDataSetChanged();
        typeTv.setText("其他");
        typeIv.setImageResource(R.mipmap.user_s);
    }

    @Override
    public void updateAccounttb() {
        accountBean.setKind(0);
        dataManager.updateItemAccounttb(accountBean,id);
    }
}
